********************************************************************************
* CREATING MAIN TABLE   
* File description: Creating table 5
********************************************************************************

clear all
set more off


use "use/final_data", clear


* Setting controls
global controls age age2 female educ married kids unemployed
global area_controls avg_age share_poor share_loweduc share_selfemployed share_female avg_kids share_married lnp50 lnp20 lnhouseprice population

* Table 5: Analysis yitz_muni
	
set more off
eststo clear

eststo: reg claim_dummy yitz_muni lndispinc lndispinc2 i.year, cluster(municipality) robust

eststo: reg claim_dummy yitz_muni lndispinc lndispinc2 $controls i.year, cluster(municipality) robust

eststo: areg claim_dummy yitz_muni lndispinc lndispinc2 $area_controls $controls i.year, a(municipality) cluster(municipality) robust

eststo: areg claim_dummy yitz_muni lndispinc lndispinc2 $area_controls $controls i.year i.municipality#c.year, a(municipality) cluster(municipality) robust

eststo: reghdfe claim_dummy yitz_cfarnr lndispinc lndispinc2 $controls lnp50_cfarnr population_cfarnr, a(CfarNr year cfarnr_year) cluster(CfarNr) 

esttab using "out/tables/table5.tex", label replace se
		
